#include<stdio.h>
#include<string.h>
#include<assert.h>
int my_strcmp(const char* str1, const char* str2)
{
	assert(str1 && str2);
	int ret = 0;
	while (*str1 == *str2)
	{
		if (*str1 == '\0')
			return 0;
		str1++;
		str2++;
	}
		if (*str1 > *str2)
			ret = 1;
		else 
			ret = -1;
	return ret;
}
int main()
{
	char arr1[] = "abcdef";
	char arr2[] = "abcd";
	int ret1 = strcmp(arr1, arr2);
 	int ret2 = my_strcmp(arr1, arr2);
	if (ret1 == 0)
		printf("arr1 == arr2\n");
	else if (ret1 > 0)
		printf("arr1 > arr2\n");
	else
		printf("arr1 < arr2\n");
	if (ret2 == 0)
		printf("arr1 == arr2");
	else if (ret2 > 0)
		printf("arr1 > arr2");
	else
		printf("arr1 < arr2");
	return 0;
}